%h1 User Index
%p
  [
  %a{:href => users_url + "?display=clients", :title => "show only clients"}clients
  ][
  %a{:href => users_url + "?display=admins", :title => "show only admins"}admins
  ][
  %a{:href => users_url + "?display=new", :title => "show only new users"}new
  ][
  %a{:href => users_url, :title => "show only admins"}all
  ]
%p
  There are
  = @users.length.to_s
  total users,
  - clients = []
  - @users.each {|user| clients << user if user.is_client?}
  %span.client
    = pluralize(clients.length, "client")
  
%ul
  - @users.each do |user|
    %li.user
      - if user.created_at > 30.days.ago
        %span.new_user
          [new]
      %a{:href => user_url(user), :title => "see " + user.login + "'s user info", :class => ("client" if user.is_client?)}= user.login
      has 
      = pluralize(user.galleries.count, "gallery") + " and has made "
      = pluralize(user.comments.count, "comment") + ". "
      Joined on
      = user.created_at.strftime("%m/%d/%y at %I:%M %p")